-
-
Notifications
You must be signed in to change notification settings - Fork 932
Fix image sources being clipped at -180 and 180 longitude when terrain is enabled #5989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix image sources being clipped at -180 and 180 longitude when terrain is enabled #5989
Conversation
…o issue-4088-image-source-clipped-world-wrap-0
…o issue-4088-image-source-clipped-world-wrap-0
|
Can you attach a screen shot of how the render test would look without the fix to make sure the render test covers this scenario? |
|
For the coverage report, this is a bit more complex. I assume the coverage report is based on unit tests. Unit tests check only logic responsible for adding and omitting tiles. They do not test matrix computation. This is because I believe tests should be easy to verify, it should be clear if they are correct, while in such tests we would compare some magic numbers in 3D matrices. This logic is however tested in render test - but only a part of it. For the matrix there are 3 different scenarios, depending on a image and terrain tile zoom level (might be higher, lower or the same). I tested only the case which was relevant for the reported issue. My assumption was that I shouldn't add too many render tests, I didn't want to make them too granular covering very narrow edge cases. Let me know if and how I can improve that. Should I add unit or render tests? Or current state is ok? |
|
Both render tests and unit tests are added to the coverage report, I think you might be able to find it in codecov site, unfortunately it doesn't get printed here due to a big on their side. |
|
As far as I can tell from the code coverage report, the last else was not covered before this PR and seems like it is still not covered after this PR. Let me know if there's anything else I can help with. |



Fix image sources being clipped at -180 and 180 longitude when terrain is enabled.
TL;DR
Lack for wrapping support for terrain render to texture tiles.
Long description.
Terrain tiles are rendered to the texture, which then is rendered to the tile (images as well) so content can't overlap between tiles. There was no support for wrapping, so for every wrap image was rendered on the same position relative to the tile.
See the diagram:

The image on tile with wrap = 0 is rendered at desired position, however on tile with wrap = 1 it is rendered on the same position in relation to a tile as for previous one. It should be actually rendered with shift.
Before:
After:
I also added render test.
Launch Checklist
CHANGELOG.mdunder the## mainsection.